home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / bbs / omake179.zip / BASE.BAT next >
DOS Batch File  |  1997-04-30  |  4KB  |  129 lines

  1. @ECHO OFF
  2. REM This is the commented batch file from the 
  3. REM OPUS 1.79 SYSOP OPERATIONS MANUAL
  4.  
  5. <Drive>
  6. CD <Base_Dir>
  7. REM make sure we are where we think we are
  8.  
  9. REM X00 B,0,38400 T=8192 R=4096 F=12
  10. REM XU CAPTURE
  11. REM load the comms fossil and make sure it has
  12. REM control of the comms interrupt 
  13.  
  14. :MODEM
  15. SET OPUS=BBS
  16. REM SET TZ=UTC-10
  17. REM set up some environment variables, especially the
  18. REM timezone (tz) so that opus can keep track of events
  19.  
  20. REM AT COM1: s2=255s7=50s50=0s52=1s53=1s54=4q0v1
  21. REM AT COM1: s0=0s9=12s51=5s58=2s66=1s68=2s90=1e0x3&w
  22. REM initialise the Trailblazer PEP/V32 modem
  23.  
  24. REM OPUSDATE + NERF ** Opus Online ** >> C:\opus\opus.log
  25. REM make a log entry
  26.                  
  27. :OPUS
  28. CHAT 25
  29. OPUS BBS 
  30. REM load the chat fossil and run opus using the bbs
  31. REM parameter file produced from the bbs.ctl file by nacl
  32.  
  33. :TEST
  34. IF ERRORLEVEL 255 GOTO ERROR255
  35. IF ERRORLEVEL 16 GOTO MASH
  36. IF ERRORLEVEL 12 GOTO DOS
  37. IF ERRORLEVEL 9 GOTO OPUS
  38. IF ERRORLEVEL 4 GOTO ERROR4
  39. IF ERRORLEVEL 3 GOTO ERROR3
  40. IF ERRORLEVEL 2 GOTO ERROR2
  41. IF ERRORLEVEL 1 GOTO OFFLINE
  42. GOTO ERROR0
  43. REM test for various dos errorlevels so that
  44. REM we can take the appropriate action
  45.  
  46. :MASH
  47. REM OMMM
  48. GOTO OPUS
  49. REM run oMMM to bundle mail and then rerun opus
  50.  
  51. :DOS
  52. REM OPUSDATE # NERF Sysop dropped to DOS >> c:\opus\opus.log
  53. REM log that sysop is heading for dos
  54.  
  55. REM NEWBAUD C:\OPUS\LASTUS00.DAT
  56. REM IF ERRORLEVEL 96 GOTO REMOTE_DROP
  57. REM IF ERRORLEVEL 48 GOTO REMOTE_DROP
  58. REM IF ERRORLEVEL 24 GOTO REMOTE_DROP
  59. REM IF ERRORLEVEL 12 GOTO REMOTE_DROP
  60. REM IF ERRORLEVEL 3 GOTO REMOTE_DROP
  61. REM IF ERRORLEVEL 0 GOTO LOCAL_DROP
  62. REM newbaud reads the baud rate from lastus00.dat and exits
  63. REM with an errorlevel = baud/100 so we can check if the
  64. REM sysop logged on from the keyboard
  65.  
  66. :REMOTE_DROP
  67. REM FSU 1 ON +
  68. REM CTTY COM1:
  69. REM ECHO ## Type EXIT to return to Opus ##
  70. REM ECHO ** Carrier Monitoring in effect **
  71. REM sysop must be logged on remotely so
  72. REM turn on modem carrier watchdog and
  73. REM redirect screen and keybaord to the
  74. REM comms port
  75.  
  76. :LOCAL_DROP
  77. COMMAND
  78. REM we are here either because we fell through from
  79. REM remote_drop, or the sysop logged on from the 
  80. REM keyboard 
  81.  
  82. :RETURN
  83. REM C:
  84. REM CD C:\OPUS
  85. REM FSU 1 OFF -
  86. REM OPUSDATE # NERF Sysop returned from DOS >> c:\opus\opus.log
  87. REM CTTY CON
  88. REM make sure we are in the opus directory when returning
  89. REM from dos, turn off carrier watchdog, log sysop's return
  90. REM and cancel redirection of screen and keyboard
  91.  
  92. OPUS BBS -O
  93. GOTO TEST
  94. REM restart opus with the relog option and loop back to
  95. REM errorlevel tests NOTE: after relog exit is set to 9
  96. REM so that after the sysop logs off opus will exit with
  97. REM errorlevel 9 and be rerun without the -o relog switch
  98.  
  99. :ERROR0
  100. REM OPUSDATE ! NERF Errorlevel not detected in TEST >> c:\opus\opus.log
  101. GOTO OPUS
  102. REM log error and rerun opus
  103.  
  104. :ERROR2
  105. REM OPUSDATE ! NERF Opus Errorlevel 2: Recycling >> c:\opus\opus.log
  106. GOTO OPUS
  107. REM log error and rerun opus
  108.  
  109. :ERROR3
  110. REM OPUSDATE ! NERF Opus Errorlevel 3: Halting >> c:\opus\opus.log
  111. GOTO OFFLINE
  112. REM log error and halt
  113.  
  114. :ERROR4
  115. REM OPUSDATE ! NERF Opus Errorlevel 4: Recycling >> c:\opus\opus.log
  116. GOTO OPUS
  117. REM log error and rerun opus
  118.  
  119. :ERROR255
  120. REM OPUSDATE ! NERF MSC Stack Error: Recycling >>  c:\opus\opus.log
  121. GOTO OPUS
  122. REM log error and rerun opus
  123.  
  124. :OFFLINE
  125. REM OPUSDATE : NERF ** Sentry Taken Offline ** >> c:\opus\opus.log
  126. ECHO ON
  127. REM log system taken offline
  128.  
  129.